<%--
    Document   : register
    Created on : Jun 3, 2014, 3:38:35 AM
    Author     : Satyapal
--%>

 <!---Working Zone--->
 <script type="text/javascript">
	window.history.forward(1);
	function noBack()
  {
            window.history.forward();
  }
</script>





<jsp:include page="header.jsp"/>
 
    <li><a href="register.jsp">Sign Up</a></li>

         </ul>
        </nav>


  </div>
 </div>






<div style="position:relative;width: auto;z-index: 10000;">
    <div id="cssmenu" style="background-color: black;">
     <section class="innerpages">
         <div class="grid_12" style="background-image: url('commonfiles/images/satyapal.jpg'); width:100%;">
             <h1>Login</h1>
         </div>
     </section>
</div>
</div>


<div class="block2">
    <div class="re">
    <div class="regs1">

         <div >
            <h1 style="padding: 42px 0 24px; font-size: 28px; line-height: 36px">
                Connect with Vehicalhai.com<br>Fulfill the dream of your car.. </h1>
         </div>
        <div style="width: 580px;">
            <ul class="our_process">
              <li class="img1" type="none">
                <h4>Step1: Client</h4>
                <p>A brand new car at just the Down payment? People who have always dreamed of owning a car but found- the Down payment a little too heavy on the pocket can drive away in a brand new world of art.
For purchasing your dream car through vehicle hai.com, first select the car you wish to own by just paying its 50% down payment.
For this, register your details on vehiclehai.com.  As soon as your name gets registered, you get an instant call on the number registered by the service center.
 </p>
              </li>
              <li class="img2" type="none">
                <h4>Step2: VehicleHai</h4>
                <p>As soon as you are registered with vehiclehai.com, you get an immediate service by the customer execu
tive as per your required dream vehicle.
The customer executive will provide you with all the terms and conditions and the policies of the company.
  </p>
              </li>
              <li class="img3" type="none">
                <h4>Step3:Financers</h4>
                <p>The ways to promote the brand by the company is diversified to a different level, managing all the activities regarding sales generation to the high level by some innovative ideas.  </p>
              </li>
              <li class="img4" type="none">
                <h4>Step4:Advertisements</h4>
                <p>For free EMI car, the company will post an advertisement on the doors of your car for the term of 5 years. </p>
              </li>
            </ul>
    </div>
    </div>
    <div class="registerform">
            <p15>Note: Please make sure your details are correct before submitting form and that all fields are completed!.</p15>




<script language="JavaScript">
 var flag=0;

function checnum(as)
{
	var dd = as.value;

        if(dd.length<=10){

            if(isNaN(dd))
                    {
                            dd = dd.substring(0,(dd.length-1));
                            as.value = dd;
                    }

        }
        else{


             dd = dd.substring(0,(dd.length-1));
                            as.value = dd;
        }

        if(dd.length==10){
            flag=1;
        }

        if(dd.length<10){
            flag=0;
        }


}


 function onlyAlphabets(e, t) {
            try {
                if (window.event) {
                    var charCode = window.event.keyCode;
                }
                else if (e) {
                    var charCode = e.which;
                }
                else { return true; }
                if ((charCode > 64 && charCode < 91) || (charCode > 96 && charCode < 123))
                    return true;
                else
                    return false;
            }
            catch (err) {
                alert(err.Description);
            }
        }



        function mob(){

        outputdiv = document.getElementById('clr');
	outputdiv.innerHTML = "";
            if(flag==0){
                 alert("Invalid Mobile Number");

                    emailChk.value="";

                }


        }






        function checkPass()
{
    //Store the password field objects into variables ...
    var pass1 = document.getElementById('pass1');
    var pass2 = document.getElementById('pass2');
    //Store the Confimation Message Object ...
    var message = document.getElementById('confirmMessage');
    //Set the colors we will be using ...
    var goodColor = "#66cc66";
    var badColor = "#ff6666";
    //Compare the values in the password field
    //and the confirmation field
    if(pass1.value == pass2.value){
        //The passwords match.
        //Set the color to the good color and inform
        //the user that they have entered the correct password
        pass2.style.backgroundColor = goodColor;
        message.style.color = goodColor;
        message.innerHTML = "Passwords Match!"
    }else{
        //The passwords do not match.
        //Set the color to the bad color and
        //notify the user.
        pass2.style.backgroundColor = badColor;
        message.style.color = badColor;
        message.innerHTML = "Passwords Do Not Match!"
    }
}















</script>

 <%


                String emailId=(String)session.getAttribute("emailId");
                String password=(String)session.getAttribute("password");

        %>



        <div id="signup" style="width:422px; height: 367px; margin: 100px 188px 0 0; ">
                           <form action="chk.jsp">
                                <div id="formHead" align="center">

                                    <h1>Login</h1>


                                </div>
                               <input type="text" id="userName"   placeholder="Enter Email Hear... example:abc@example.com" required="" name="emailId" style="width: 372px;">

                               <input type="password" id="password" placeholder="Enter Password Hear..." required="" name="password" id="pass1" style="width: 372px;"/>
                               
                               <input type="checkbox" onclick="set()" id="active"/>Remember me on this browser
                               <button type="submit">Click To Login!</button>


                            </form>

                            </div>

           </div>

</div>
</div>




<script type="text/javascript" src="jquery-1.3.2.min.js"></script>


<script type="text/javascript">

   // alert(getCookie("chk"));

   var not="0";

     if(getCookie("flag")=="1"){

            $('input:#userName').val(getCookie("userName"));
            $('input:#password').val(getCookie("password"));

            document.getElementById("activ").checked=true;

            not="1";
            
    }


    function setCookie(cname,cvalue,exdays) {
    var d = new Date();
    d.setTime(d.getTime() + (exdays*24*60*60*1000));
    var expires = "expires=" + d.toGMTString();
    document.cookie = cname+"="+cvalue+"; "+expires;
}

function getCookie(cname) {
    var name = cname + "=";
    var ca = document.cookie.split(';');
    for(var i=0; i<ca.length; i++) {
        var c = ca[i].trim();
        if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
    }
    return "";
}


    $("button:#GetCookies").click(function () {

        alert(getCookie("userName"));
        alert(getCookie("password"));


    });

    function set(){      

        /*alert($('input:#userName').val());
        alert($('input:#password').val());*/

         if(not=="1"){

             setCookie("userName","", 30);
             setCookie("password","", 30);
             setCookie("flag", "0", 30);

          }
         if(not=="0"){

             setCookie("userName", $('input:#userName').val(), 30);
             setCookie("password", $('input:#password').val(), 30);
             setCookie("flag", "1", 30);

          }

    }         
       
          
</script>


<jsp:include page="footer.jsp"/>
